package com.tongfusoft.web.core.listener;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import com.tongfusoft.web.core.SessionContext;

public class SessionListener implements HttpSessionListener {
	public void sessionCreated(HttpSessionEvent httpSessionEvent) {
		SessionContext.AddSession(httpSessionEvent.getSession());
	}

	public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
		HttpSession session = httpSessionEvent.getSession();
		SessionContext.DelSession(session);
	}

}